home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1984 Half 1
/
rerun-1984-01-06-side-b.d64
/
serpent module
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
156 lines
1 rem serpent of death by jim & tom hoppe april '83
4 poke36869,255:goto20000
5 dimjs(2,2)
6 fs=7991:fc=38711:ss=7713:cs=38433:s=7712:c=38432
7 if4*(peek(36866)and128)+64*(peek(36869)and112)=4096thengosub10000
10 fori=0to2:forj=0to2:readjs(j,i):nextj,i
50 ts=0:l=1:aa=100:dd=37154:pa=37137:pb=37152:cd=1
52 bs=1:vs=5:bs=1
55 poke37139,0:poke36878,15
90 ifpeek(52)=28then95
95 poke36879,157:poke36869,255
100 print"[147]"tab(32)"@ab"tab(32)"bbb"tab(31)"@bcab"tab(31)"cabbb"tab(30)" bbbcab"
110 printtab(8)"@bcabbb"tab(29)"@@abbbcab"tab(29)"bbbbcabbb"tab(28)"@@bcabbbcab"
120 printtab(6)"c@abbbcabbb"tab(27)" bbbbcabbbcab"tab(27)"@@bcabbbcabbb"
130 printtab(4)" bcabbbcabbbcab"tab(25)" @abbbcabbbcabbb"
140 printtab(4)"bbbcabbbcabbbbb"tab(25)" jkjjkjkjjkjkjk"
210 pokes+h+22*v,4:pokec+h+22*v,2
500 gosub9000
510 ifts>0thents=(ts-1)
550 gosub2000
560 js=js(x+1,y+1):ifjs<8thengosub1500
590 iffr=1thengosub3500
700 ifts=0andvn=1thengoto6000
710 ifts>0thenprint"cobra venom active "right$(str$(ts),2)
1000 goto500
1499 rem jump
1500 pokes+h+22*v,ba:pokec+h+22*v,c1
1501 ifjs=0thenv=v-4:ifv<-3thenv=-1
1502 ifjs=1thenv=v-3:h=h+1:ifv=-3thenv=-1
1503 ifjs=2thenh=h+1:v=v-1
1504 ifjs=3thenh=h+1
1505 ifjs=4thenv=v+1
1506 ifjs=5thenh=h-1
1507 ifjs=6thenh=h-1:v=v-1
1508 ifjs=7thenv=v-3:h=h-1:ifv=-3thenv=-1
1510 ba=peek(s+h+22*(v-1)):c2=(peek(c+h+22*(v-1))and15)
1515 pokes+h+22*(v-1),4:pokec+h+22*(v-1),2
1520 pokes+h+22*(v-1),ba:pokec+h+22*(v-1),c2
1525 gosub3050
1530 return
1999 rem snakes
2000 ifct=0thencd=1
2001 pokess+hs+22*vs,bs:pokecs+hs+22*vs,cd
2003 gs=int(rnd(1)*4)+1
2005 ifgs=1thenvs=vs-3:hs=hs+1:pokefs+22*up,32:fs=7991:fc=38711
2006 ifgs=2thenhs=hs+1:ifl>2thenpokefs+22*up,32:fs=7962:fc=38682
2007 ifgs=3thenhs=hs-1:ifl>4thenpokefs+22*up,32:fs=7840:fc=38560
2008 ifgs=4thenvs=vs-3:hs=hs-1:ifl>6thenpokefs+22*up,32:fs=7827:fc=38547
2009 pokefs+22*up,6:pokefc+22*up,6
2010 bs=peek(ss+hs+22*(vs-1)):cd=(peek(cs+hs+22*(vs-1))and15)
2015 pokess+hs+22*(vs-1),8:pokecs+hs+22*(vs-1),5
2020 pokess+hs+22*(vs-1),bs:pokecs+hs+22*(vs-1),cd
2025 gosub4050
2030 return
3049 rem falling
3050 v=v+1
3051 ifv>16thengoto5000
3060 ba=peek(s+h+22*v):c2=((peek(c+h+22*v))and15)
3070 pokes+h+22*v,4:pokec+h+22*v,2
3074 print""tab(17)"level[157][157][157][157]"l
3075 if((ba=0orba=1orba=3)andc2=1)thenct=ct+1:cw=cw+1
3076 ifba=8thenco=co+100:cw=cw+100:ts=0:vn=0:gosub55000
3077 print"score"cw"":ifct>54thengoto60000
3078 ifct+co>aathenba=bs:goto60000
3079 ifba=6thents=0:vn=0:poke36879,157:print" "
3080 ifba=8thents=0:vn=0:poke36879,157:print" "
3081 ifba=1orba=3orba=0orba=6orba=7thenpoke36874,200:fort=1to200:next:poke36874,0:return
3090 pokes+h+22*v,ba:pokec+h+22*v,c2
3099 goto3050
3500 ifv=0thenreturn
3501 ifba<>6thenreturn
3505 up=up-1
3510 pokefs+22*(up+1),32
3515 pokefs+22*up,6:pokefc+22*up,6
3520 ifgs=1orgs=2thenk=15:ifgs=3orgs=4thenk=8
3530 ifup<-15thenpoke36876,0:v=0:h=0:up=0:pokefs,6:ba=0:goto210
3540 poke36876,190-up
4000 goto3505
4050 vs=vs+1
4052 ifvs>15thenvs=0:hs=0:cd=peek(cs):bs=1:return
4060 bs=peek(ss+hs+22*vs):cd=((peek(cs+hs+22*vs))and15)
4070 pokess+hs+22*vs,8:pokecs+hs+22*vs,5
4074 ifbs=0orbs=1orbs=3thengosub58000
4075 ifbs<>4thengoto4080
4076 ifbs=4andts=0thents=20:vn=1:poke36879,170
4077 fort=1to100:poke36877,255-t:nextt:poke36877,0:pokess+hs+22*vs,4:pokecs+hs+22*vs,2
4080 ifbs=0orbs=1orbs=3thenreturn
4090 pokess+hs+22*vs,bs:pokecs+hs+22*vs,cd
4099 goto4050
4999 rem noise falling
5000 poke36878,15:fort=1to30
5010 poke36875,220-t
5040 form=1to30:nextm
5050 nextt
5060 poke36875,0:forl=1to20:poke36877,199+l:nextl:poke36877,0
5070 fort=1to1000:nextt:goto6000
5999 rem death
6000 poke36879,8
6010 print"[147]king tut is dead!!"
6020 print"even the mummy can't save him now!"
6025 print"score="cw
6030 poke36875,0:ts$="00"
6050 poke36878,15:form=1to5:fort=255to128step-1:poke36874,t:nextt:nextm:poke36874,0
6051 goto20000
7000 poke36874,200:fort=1to200:next:poke36874,0
7020 return
8999 remjoystick
9000 pokedd,127:s3=-((peek(pb)and128)=0):pokedd,255
9010 p=peek(pa):s1=-((pand8)=0):s2=((pand16)=0):s0=((pand4)=0)
9020 fr=-((pand32)=0):x=s2+s3:y=s0+s1:return
10000 fs=4407:fc=38199:ss=4129:cs=37921:s=4128:c=37920:return
20000 print"[147]":poke36879,25
20010 print"[144] the"
20020 print"serpent of death"
20030 forb=0to22:pokeb+7680,8:poke38400+b,5:nextb
20035 forb=0to22:poke7702+b*22,8:poke38422+b*22,5:nextb
20040 forb=0to22:poke7723+b*22,8:poke38443+b*22,5:nextb
20045 forb=0to20:poke8165+b,8:poke38885+b,5:nextb
20050 print"[144]starring:"
20052 print"[144]king tut[146] d "
20055 print"[144]the mummy [146]f"
20060 print"[144]ms. cobra [146]h"
20070 print" score="cw
20071 restore:gosub63010
20072 print" [156]hit any key"
20075 geta$:ifa$=""then20075
20100 restore:clr:goto5
49999 rem snake hiss
50000 fort=1to100:poke36877,255-t:nextt
50100 poke36877,0:return
55000 forx=1to90:poke36874,128+x:nextx
55050 forx=1to90:poke36874,218-x:nextx
55100 poke36874,0
55150 return
57999 remsnake hit square
58000 poke36877,200:poke36877,0:return
59999 rem harder level
60000 l=l+1:ct=0:co=0:v=0:h=0:vs=3:hs=0:cd=1:ba=0:bs=3
60010 cd=c1:ifl>1thenc1=3:aa=200:ifl>2thenc1=6:aa=300:ifl>3thenc1=5:aa=400
60015 ifl>4thenc1=4:aa=500:ifl>5thenc1=2:aa=600:ifl>6thenc1=7:aa=700
60017 gosub3079
60020 goto95
63010 poke36878,15:b=.4
63012 fori=0to2:forj=0to2:readjs(j,i):nextj,i
63015 readq,r
63020 ifq=0thenreturn
63030 poke36876,q
63040 t=ti+b*r
63050 ifti<tthen63050
63060 poke36876,0
63070 goto63015
63400 data7,0,1,6,8,2,5,4,3
63500 data195,45,201,45,203,99,201,99,195,99,195,45,201,45
63510 data203,45,215,45,201,45,203,45,195,80,195,5,201,5,207,5,209,5,215,5,219,5,223,5
63520 data225,5,0,0